import request from '@/utils/request'

// 查询预警规则列表
export function listWarningRule(query) {
  return request({
    url: '/ys/warningRule/list',
    method: 'get',
    params: query
  })
}

// 查询预警规则详细
export function getWarningRule(id) {
  return request({
    url: '/ys/warningRule/' + id,
    method: 'get'
  })
}

// 新增预警规则
export function addWarningRule(data) {
  return request({
    url: '/ys/warningRule',
    method: 'post',
    data: data
  })
}

// 修改预警规则
export function updateWarningRule(data) {
  return request({
    url: '/ys/warningRule',
    method: 'put',
    data: data
  })
}

// 删除预警规则
export function delWarningRule(id) {
  return request({
    url: '/ys/warningRule/' + id,
    method: 'delete'
  })
}
